﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace YasharEl.Infrastructure.ProcessEngine.DomainModel
{
    [ContractClass(typeof(ProcessQueryManagerContract))]
    public interface IProcessQueryManager
    {
        IProcess GetProcessInstance(long applicationId, long userId, Guid workflowInstanceId);
    }

    [ContractClassFor(typeof(IProcessQueryManager))]
    internal abstract class ProcessQueryManagerContract : IProcessQueryManager
    {
        #region IProcessQueryManager Members

        public IProcess GetProcessInstance(long applicationId, long userId, Guid workflowInstanceId)
        {
            Contract.Requires<ArgumentNullException>(applicationId > 0, "applicationId should be valid positive number.");
            Contract.Requires<ArgumentNullException>(userId > 0, "userId should be valid positive number.");
            Contract.Requires<ArgumentNullException>(workflowInstanceId != Guid.Empty, "workflowInstanceId must be valid Guid.");

            return default(IProcess);
        }

        #endregion
    }
}
